﻿using BotDetect.Web.UI.Mvc;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;

namespace _2009035.Utilities
{
    public static class CaptchaHelper
    {
        public static MvcCaptcha GetRegistrationCaptcha()
        {
            // create the control instance
            MvcCaptcha registrationCaptcha = new MvcCaptcha("RegistrationCaptcha");

            // set up client-side processing of the Captcha code input textbox
            registrationCaptcha.UserInputClientID = "CaptchaCode";

            // Captcha settings
            registrationCaptcha.ImageSize = new System.Drawing.Size(200, 50);
            registrationCaptcha.CodeLength = 4;

            // settings have to be saved before rendering
            registrationCaptcha.SaveSettings();

            return registrationCaptcha;
        }

        public static MvcCaptcha GetSampleCaptcha()
        {
            // create the control instance
            MvcCaptcha sampleCaptcha = new MvcCaptcha("SampleCaptcha");

            // set up client-side processing of the Captcha code input textbox
            sampleCaptcha.UserInputClientID = "CaptchaCode";

            // settings have to be saved before rendering
            sampleCaptcha.SaveSettings();

            return sampleCaptcha;
        }

    }
}